package com.shanzmoo.db.sys.entity.vo;

import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.shanzmoo.db.sys.entity.OutletInfoEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 门店信息分页返回对象
 *
 * @author Gzhao
 * @date 2020/12/12
 */
@Data
@ApiModel("门店信息分页返回对象")
public class OutletInfoPageVo {

    @ApiModelProperty("门店ID")
    private Integer id;

    @ApiModelProperty("门店名称")
    private String name;

    @ApiModelProperty("门店订单标记")
    private String mark;

    @ApiModelProperty("备注")
    private String remark;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    public static OutletInfoPageVo create(OutletInfoEntity outletInfoEntity) {
        return JSON.parseObject(JSON.toJSONString(outletInfoEntity), OutletInfoPageVo.class);
    }
}
